In an autofocus apparatus such as an electronic still camera or video camera, a lens position where the high-frequency component of a luminance signal obtained from an image sensing element such as a CCD maximizes is set as an in-focus position. Known examples of this method are a hill-climbing method of moving the lens in a direction in which the high-frequency component (to be referred to as a focus evaluation value hereinafter) of a luminance signal obtained from an image sensing element and setting as an in-focus position a position where the focus evaluation value maximizes, and a scan method of storing focus evaluation values while driving the lens in the entire distance measurement range and setting as an in-focus position a lens position corresponding to the maximum value among stored values.
According to these methods, the central portion of a photographing window is generally set as a distance measurement frame, as shown in FIG. 12. A lens position where the focus evaluation value maximizes for an object to be photographed within the range is defined as an in-focus position. The obtained lens position and focus evaluation value draw an upwardly convex curve as shown in FIG. 13.
When no upwardly convex curve as shown in FIG. 13 can be obtained due to low object contrast and an in-focus position cannot be calculated, the focus lens is moved to a predetermined position. In many cases, the predetermined position is set to a position where an object exists at high probability, or a so-called hyperfocal position including infinity on the far side of the depth of field.
Some cameras have both a manual focus function of manually adjusting the focus position by the photographer, and an autofocus function, and allow the photographer to select either function. In such camera, there is known a method of roughly adjusting the focus by the photographer by manual focusing, and then scanning a narrow range before and after the focus lens position by autofocusing to finely adjust the focus.
If the in-focus position cannot be calculated because of low object contrast when a range before and after the position adjusted by manual focusing is scanned by autofocusing, moving the focus lens to a predetermined position set in the above way may greatly change the focus position roughly adjusted by the photographer.
For example, assume that the above-mentioned predetermined position is set to a hyperfocal position, and the photographer moves the focus lens close to the minimum object distance position within a focusable range. In this case, if the in-focus position cannot be calculated due to low object contrast upon autofocusing, the lens is undesirably moved to a hyperfocal position. That is, the lens moves close to infinity though the photographer has manually moved the lens to the minimum object distance position. The focus then greatly deviates from an object to be photographed by the photographer, and fine adjustment of the focus position greatly changes the focus position.